<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>关系选择器 | Welcome to use MarkDown</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="gitbook/style.css">
    
        
        <link rel="stylesheet" href="gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="./weileixuanzeqi.html" />
    
    
    <link rel="prev" href="./class and id.html" />
    

        
    </head>
    <body>
        
        
    <div class="book"
        data-level="1.5"
        data-chapter-title="关系选择器"
        data-filepath="guanxixuanzeqi.md"
        data-basepath="."
        data-revision="Tue Dec 12 2017 20:29:49 GMT+0800 (中国标准时间)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="./index.html">
                
                        <i class="fa fa-check"></i>
                        
                        Introduction
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="section1/index.html">
            
                
                    <a href="./section1/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        css
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="dizhi.html">
            
                
                    <a href="./dizhi.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        example 1
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="section2/css.html">
            
                
                    <a href="./section2/css.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.</b>
                        
                        css的引用方式
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="css.html">
            
                
                    <a href="./css.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.</b>
                        
                        元素选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="class and id.html">
            
                
                    <a href="./class and id.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.</b>
                        
                        class和id选择器
                    </a>
            
            
        </li>
    
        <li class="chapter active" data-level="1.5" data-path="guanxixuanzeqi.html">
            
                
                    <a href="./guanxixuanzeqi.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.5.</b>
                        
                        关系选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="weileixuanzeqi.html">
            
                
                    <a href="./weileixuanzeqi.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.6.</b>
                        
                        伪类选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="shuxingxuanzeqi.html">
            
                
                    <a href="./shuxingxuanzeqi.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.7.</b>
                        
                        属性选择器
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2" data-path="section2/index.html">
            
                
                    <a href="./section2/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        html
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="abiaoqian.html">
            
                
                    <a href="./abiaoqian.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        a标签
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="abiaoqianmaodian.html">
            
                
                    <a href="./abiaoqianmaodian.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        a标签锚点
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="img.html">
            
                
                    <a href="./img.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.</b>
                        
                        img
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.4" data-path="biaoqian.html">
            
                
                    <a href="./biaoqian.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.</b>
                        
                        标签
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.5" data-path="requ.html">
            
                
                    <a href="./requ.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.5.</b>
                        
                        热区
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.6" data-path="yuansu.html">
            
                
                    <a href="./yuansu.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.6.</b>
                        
                        认识页面以及认识行内和块级元素
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="./" >Welcome to use MarkDown</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h1 id="&#x5173;&#x7CFB;&#x9009;&#x62E9;&#x5668;">&#x5173;&#x7CFB;&#x9009;&#x62E9;&#x5668;</h1>
<pre><code>    &lt;ul class=&quot;nav&quot;&gt;
        &lt;li&gt;&#x9996;&#x9875;&lt;/li&gt;
        &lt;li&gt;&#x4EA7;&#x54C1;
            &lt;ul class=&quot;subnav&quot;&gt;
                &lt;li class=&quot;egg&quot;&gt;&#x9E21;&#x86CB;&lt;/li&gt;
                &lt;li&gt;&#x9E45;&#x86CB;&lt;/li&gt;
                &lt;li&gt;&#x70B8;&#x5F39;&lt;/li&gt;
                &lt;li&gt;&#x6050;&#x9F99;&#x86CB;&lt;/li&gt;
            &lt;/ul&gt;
        &lt;/li&gt;
        &lt;li&gt;&#x5173;&#x4E8E;&#x6211;&#x4EEC;&lt;/li&gt;
    &lt;/ul&gt;
</code></pre><h2 id="&#x7236;&#x5B50;&#x5173;&#x7CFB;">&#x7236;&#x5B50;&#x5173;&#x7CFB;</h2>
<h3 id="&#x5173;&#x7CFB;&#x9009;&#x62E9;&#x5668;&#x4E2D;&#xFF0C;&#x7236;&#x5B50;&#x5173;&#x7CFB;">&#x5173;&#x7CFB;&#x9009;&#x62E9;&#x5668;&#x4E2D;&#xFF0C;&#x7236;&#x5B50;&#x5173;&#x7CFB;</h3>
<p>&#x901A;&#x8FC7;&#x6307;&#x5B9A;&#x7236;&#x5143;&#x7D20;&#x53CA;&#x5177;&#x4F53;&#x7684;&#x5B50;&#x5143;&#x7D20;&#xFF0C;&#x6765;&#x6307;&#x5B9A;&#x6211;&#x4EEC;&#x7684;&#x63A7;&#x5236;&#x76EE;&#x6807;
&#x6CE8;&#x610F;:&#x66F4;&#x7CBE;&#x51C6;&#x7684;&#x63A7;&#x5236;&#xFF0C;&#x53EF;&#x4EE5;&#x5C0F;&#x8303;&#x56F4;&#x63A7;&#x5236;&#x67D0;&#x4E00;&#x7C7B;&#x5143;&#x7D20;</p>
<h3 id="&#x4EE3;&#x7801;">&#x4EE3;&#x7801;</h3>
<pre><code>.nav &gt; li{
            font-size:30px ;
            font-weight: bold;
        }
</code></pre><h2 id="&#x540E;&#x4EE3;&#x5173;&#x7CFB;">&#x540E;&#x4EE3;&#x5173;&#x7CFB;</h2>
<p>&#x5173;&#x7CFB;&#x9009;&#x62E9;&#x5668;&#x4E2D;&#xFF0C;&#x540E;&#x4EE3;&#x5173;&#x7CFB;(&#x7A7A;&#x683C;)
&#x901A;&#x8FC7;&#x5199;&#x51FA;&#x7236;&#x5143;&#x7D20;&#x53CA;&#x5176;&#x540E;&#x4EE3;&#x5143;&#x7D20;&#xFF0C;&#x6765;&#x6307;&#x5B9A;&#x4E3A;&#x6211;&#x4EEC;&#x7684;&#x63A7;&#x5236;&#x76EE;&#x6807;
&#x6CE8;&#x610F;:&#x8FD9;&#x79CD;&#x4F1A;&#x6BD4;&#x7236;&#x5B50;&#x5173;&#x7CFB;&#xFF0C;&#x63A7;&#x5236;&#x7684;&#x8303;&#x56F4;&#x8981;&#x5927;&#xFF0C;&#x56E0;&#x4E3A;&#x4ED6;&#x662F;&#x9488;&#x5BF9;&#x6240;&#x6709;&#x7684;&#x540E;&#x4EE3;&#x5143;&#x7D20;</p>
<h3 id="&#x4EE3;&#x7801;">&#x4EE3;&#x7801;</h3>
<pre><code>    .nav li{
            text-shadow: 2px 2px 2px gray /*&#x5B57;&#x4F53;&#x9634;&#x5F71;*/; 
        }
    .subnav&gt;li{
            font-size: 20px;
            font-weight: normal;
</code></pre><h2 id="&#x5144;&#x5F1F;&#x5173;&#x7CFB;">&#x5144;&#x5F1F;&#x5173;&#x7CFB;</h2>
<p> &#x5173;&#x7CFB;&#x9009;&#x62E9;&#x5668;-&#x5144;&#x5F1F;&#x5173;&#x7CFB;(+)
&#x901A;&#x8FC7;&#x5199;&#x51FA;&#x53C2;&#x7167;&#x5143;&#x7D20;&#x5B83;&#x7684;&#x76F8;&#x90BB;&#x5143;&#x7D20;&#xFF0C;&#x6765;&#x6307;&#x5B9A;&#x4E3A;&#x6211;&#x4EEC;&#x7684;&#x63A7;&#x5236;&#x76EE;&#x6807;
&#x6CE8;&#x610F;:&#x63A7;&#x5236;&#x7684;&#x662F;&#x5176;&#x4E2D;&#x4E00;&#x4E2A;&#x5144;&#x5F1F;&#x5143;&#x7D20;</p>
<h3 id="&#x4EE3;&#x7801;">&#x4EE3;&#x7801;</h3>
<pre><code>.subnav&gt;li + li{
                color: blue;
            }
</code></pre><p>&#x5173;&#x7CFB;&#x9009;&#x62E9;&#x5668;&#x4E2D;-&#x5144;&#x5F1F;&#x5173;&#x7CFB;&#xFF08;~&#xFF09;
&#x901A;&#x8FC7;&#x5199;&#x51FA;&#x53C2;&#x7167;&#x5143;&#x7D20;&#x548C;&#x5B83;&#x7684;&#x540E;&#x7EED;&#x540C;&#x8F88;&#x5143;&#x7D20;&#xFF0C;&#x6765;&#x6307;&#x5B9A;&#x4E3A;&#x6211;&#x4EEC;&#x7684;&#x63A7;&#x5236;&#x76EE;&#x6807;
&#x6CE8;&#x610F;:&#x63A7;&#x5236;&#x7684;&#x662F;&#x540E;&#x7EED;&#x540C;&#x8F88;&#x7684;&#x6240;&#x6709;&#x7B26;&#x5408;&#x6761;&#x4EF6;&#x7684;&#x5144;&#x5F1F;&#x5143;&#x7D20;</p>
<h3 id="&#x4EE3;&#x7801;">&#x4EE3;&#x7801;</h3>
<pre><code>    .egg~li{
                border:10px solid pink ;
            }
</code></pre>
                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="./class and id.html" class="navigation navigation-prev " aria-label="Previous page: class和id选择器"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="./weileixuanzeqi.html" class="navigation navigation-next " aria-label="Next page: 伪类选择器"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="gitbook/app.js"></script>

    
    <script src="gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

    
    <script src="gitbook/plugins/gitbook-plugin-livereload/plugin.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"livereload":{}};
    gitbook.start(config);
});
</script>

        
    </body>
    
</html>
